<?php !defined('DYHB_PATH') && exit; /* DoYouHaoBaby Framework 模板缓存文件 生成时间：2011-05-28 11:36:11  */ ?>
<?php $this->includeChildTemplate( "".APP_PATH."/Tpl/Default/public_header.html" ,"" ,"" ,"" )  ;?>

   <!-- 标题  -->
   <div class="title"><?php print G::L( "数据库备份", null, null ) ; ?> ( <a href="<?php echo( G::U('backup/runsql') );?>"><?php print G::L( "运行SQL语句", null, null ) ; ?></a> | <a href="<?php echo( G::U('backup/restore') );?>"><?php print G::L( "数据库恢复", null, null ) ; ?></a> | <a href="<?php echo( G::U('backup/optimize') );?>"><?php print G::L( "数据库优化", null, null ) ; ?></a> )</div>

   <?php if(!empty( $sWarning )) :?><div id="content_warning"><?php echo( $sWarning ); ?></div><?php endif; ?>

  <!-- 正文 -->
  <div id="content" class="content">
      <form action="<?php echo( G::U('backup/dumpsql') );?>" method="post" id="backup">
      <table class="form-table full">
          <tr>
            <th valign="top"><label for="type"><?php print G::L( "备份类型", null, null ) ; ?>：</label></th>
            <td><input type="radio" name="type" value="full" class="field" checked="checked" onclick="Dyhb.Dom.$('checkList').style.display='none'"><?php print G::L( "全部备份", null, null ) ; ?>
            <input type="radio" name="type" value="custom" class="field" onclick="Dyhb.Dom.$('checkList').style.display='block'"><?php print G::L( "自定义备份", null, null ) ; ?>
            <div class="description"><?php print G::L( "请选择备份类型，可以全部备份，也可以备份一部分", null, null ) ; ?></div></td>
          </tr>
          <tr id="checkList" class="none">
            <td colspan="2">
             <table style="border:1px solid #ccc;">
                <tr>
                   <td colspan="4"><input onclick="checkAll('checkList')" type="checkbox"><b><?php print G::L( "全选", null, null ) ; ?></b></td>
                </tr>
                <tr>
                <?php if(is_array($arrTables)): $i = 0; $arrList = $arrTables;if( count($arrList)==0 ) : echo "" ;else: foreach($arrList as $key=>$sTable): ++$i;$mod = ($i % 4 )?>
                <?php if(($mod)  ==  "1"): ?>
                </tr>
                <tr>
                <?php endif; ?>
                <td><input name="customtables[]" value="<?php echo( $sTable ); ?>"  type="checkbox"><?php echo( $sTable ); ?></td>
                <?php endforeach; endif; else: echo "" ;endif; ?>
                </tr>
              </table>
              <div class="description"><?php print G::L( "请选择备份的数据库表", null, null ) ; ?></div></td>
          </tr>
          <tr>
              <th valign="top"><label for="ext_insert"  class="field"><?php print G::L( "插入方式", null, null ) ; ?></label></td>
              <td><input type="radio" name="ext_insert" class="radio" value='1'  class="field"><?php print G::L( "是", null, null ) ; ?>
              <input type="radio" name="ext_insert" class="radio" value='0' checked="checked"><?php print G::L( "否", null, null ) ; ?>
              <div class="description"><?php print G::L( "数据库备份插入(Extended Insert)方式", null, null ) ; ?></div></td>
            </tr>
            <tr>
              <th valign="top"><label for="vol_size"><?php print G::L( "分卷文件长度", null, null ) ; ?></label></td>
              <td><input type="text" name="vol_size" value="<?php echo( $nVolSize ); ?>"  class="field">
              <div class="description"><?php print G::L( "当数据量大的时候，分卷备份能够解决备份时卡死的现象", null, null ) ; ?></div>
              <div class="warning"><?php print G::L( "分卷备份长度限制单位为(KB)", null, null ) ; ?></div></td>
            </tr>
            <tr>
              <th valign="top"><label for="sql_file_name"><?php print G::L( "备份文件名", null, null ) ; ?></label></td>
              <td><input type="text" name="sql_file_name" value="<?php echo( $sSqlName ); ?>" class="field">
              <div class="description"><?php print G::L( "数据库备份文件名字", null, null ) ; ?></div></td>
            </tr>

          </table>
          <p class="center">
          <input type="submit"  class="button" value="  <?php print G::L( "开始备份", null, null ) ; ?>   " />
          <input type="reset" class="button" value="  <?php print G::L( "重  置", null, null ) ; ?>  " />
        </p>
        </form>
   </div>
   <!-- end content -->

<?php $this->includeChildTemplate( "".APP_PATH."/Tpl/Default/public_footer.html" ,"" ,"" ,"" )  ;?>